home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / magic_ba.swf / scripts / DefineSprite_158 / frame_2 / DoAction.as
Text File  |  2010-11-09  |  625b  |  21 lines

  1. nowshooting = eval("_root.ball" add _root.totalballs);
  2. setProperty(nowshooting, _Y, getProperty(nowshooting, _Y) - 10 + _root.gamelevel / 3);
  3. _root.ontheair = 10;
  4. if(getProperty(nowshooting, _Y) < getProperty(_root.roofball, _Y) + 25)
  5. {
  6.    setProperty(nowshooting, _Y, getProperty(_root.roofball, _Y));
  7.    gotoAndPlay(10);
  8. }
  9. shoottest = 1;
  10. while(shoottest < _root.totalballs)
  11. {
  12.    nowtestingball = "_root.ball" add shoottest;
  13.    if(nowshooting.hitTest(nowtestingball))
  14.    {
  15.       setProperty(nowshooting, _Y, getProperty(nowtestingball, _Y) + 25);
  16.       gotoAndPlay(10);
  17.    }
  18.    play();
  19.    shoottest++;
  20. }
  21.